namespace Chaotic.DataBase.DBAccessLibrary.Model;

[Serializable]
public class IndexDescriptionEntity : DataBaseEntity
{
	public bool IsUnique { get; set; }

	public string UniqueString
	{
		get
		{
			if (IsUnique)
			{
				return "[唯一]";
			}
			return "";
		}
	}

	public string TableName { get; set; }

	public IndexDescriptionEntity(string? name)
		: base(name)
	{
	}

	public override DataBaseEntity? Copy()
	{
		DescriptionEntity? descriptionEntity = new DescriptionEntity(base.Name);
		Copy(descriptionEntity);
		if (base.ChildNodes.Count > 0)
		{
			DataBaseEntity?[] array = base.ChildNodes.ToArray();
			foreach (DataBaseEntity? dataBaseEntity in array)
			{
				DataBaseEntity? dataBaseEntity2 = dataBaseEntity.Copy();
				if (dataBaseEntity2 != null)
				{
					descriptionEntity.ChildNodes.Add(dataBaseEntity.Copy());
				}
			}
		}
		return descriptionEntity;
	}
}
